version: Print build-id at bootup.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 6 Sep 2016 16:18:10 +0000 (12:18 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 8 Sep 2016 01:10:41 +0000 (21:10 -0400)
commitf28434d00f658d925027776d2eaf0a4c458e942d
tree46653de537e957965d029a5038cf178924e37b3a
parent4878878a4538dde45462cf0900a16a9cde5ef2f0
version: Print build-id at bootup.

Livepatch expected at some point to be able to print the
build-id during bootup, which it did not.  The reason is
that xen_build_init and livepatch_init are both __initcall
type routines. This meant that when livepatch_init called
xen_build_id, it would return -ENODATA as build_id_len was
not setup yet (b/c xen_build_init would be called later).

The original patch fixed this by calling xen_build_init in
livepatch_init which allows us to print the build-id of
the hypervisor.

However the x86 maintainers pointed out that build-id
is independent of Livepatch and in fact should print
regardless whether Livepatch is enabled or not.

Therefore this patch moves the logic of printing the build-id
to version.c.

Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/common/livepatch.c
xen/common/version.c